{if count($players) gt 0}
	<table>
		{foreach from=$players item=i}
		{if ($touched) && ($touched.who eq 'player') && ($touched.id eq $i.id)}
		<tr>
			<td>{$i.name}</td>
			<td>
				<form action="/" method="POST">
					<input type="hidden" name="m" value="pda" />
					<input type="hidden" name="d" value="msgcompose" />
					<input type="hidden" name="i" value="{$i.id}" />
					<input class="friend" type="submit" value="Г" />
				</form>
			</td>
			<td>
				<form action="/" method="POST">
					<input type="hidden" name="m" value="phonebook" />
					<input type="hidden" name="d" value="add" />
					<input type="hidden" name="i" value="{$i.id}" />
					<input class="friend" type="submit" value="+" />
				</form>
			</td>
			<td>
				<form action="/" method="POST">
					<input type="hidden" name="m" value="attack" />
					<input type="hidden" name="d" value="player" />
					<input type="hidden" name="i" value="{$i.id}" />
					<input class="attack" type="submit" value="A" />
				</form>
			</td>
		</tr>
		{else}
		<tr>
			<td>
				<form action="/" method="POST">
					<input type="hidden" name="m" value="touch" />
					<input type="hidden" name="d" value="player" />
					<input type="hidden" name="i" value="{$i.id}" />
					<input class="player" type="submit" value="{$i.name}" />
				</form>
			</td>
		</tr>
		{/if}
		{/foreach}
	</table>
	{/if}
